package com.wang.service.impl;

import com.aaa.vo.FormData;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wang.entity.EmpVo;
import com.wang.mapper.SysRoleMapper;
import com.wang.service.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, EmpVo> implements SysRole {
@Autowired
private SysRoleMapper sysRoleMapper;

    @Override
    public Result appointmentAll(Integer currentPage, Integer pageSize, FormData formData) {
        PageHelper.startPage(currentPage,pageSize);
        List<EmpVo> limit1 = sysRoleMapper.limit(formData);
        PageInfo<EmpVo> info=new PageInfo<>(limit1);
        System.out.println(limit1);
        return new Result(2000,"success",info);
    }
}
